<div id="content">

	<h2>Photos de l'album: <?php echo $data->album->getName()?></h2>
	<div id="images">
			<form method="post" action="index.php?controller=gallery&action=addImage&albumId=<?php echo $data->album->getId() ?>" enctype="multipart/form-data">
				<label for="imageAdd">Ajouter une image</label>
				<select name="imageAdd" id="imageAdd">
					<option value=""></option>
					<?php foreach ( $data->otherImages as $key => $img ) {
						echo("<option value='".$img->getId()."'>".$img->getComment()."</option>");
       				}
       				?>
				</select>
				<input type="submit" value = "ajouter"/>
			</form>
			<br>
			<form method="post" action="index.php?controller=gallery&action=emptyAlbum&albumId=<?php echo $data->album->getId() ?>" enctype="multipart/form-data">
				<label for="emptyAlbum">Vider l'album</label>
				<input type="submit" value = "Vider"/>
			</form>
		<?php
		foreach ( $data->album->getImages($this) as $key => $image) {?>
			<div class="photoList">
			<a href="index.php?controller=photo&action=next&imgId=<?php echo $image->getId() ?>" >
				<?php echo $image->getComment() ?>
			</a>
			
			<a href="index.php?controller=gallery&action=removeImage&albumId=<?php echo $data->album->getId() ?>&imgId=<?php echo $image->getId() ?>" class="remove"><img src='<?php echo dirname($_SERVER['REQUEST_URI']); ?>/images/remove.png' alt='remove' title='remove'/></a><br/>
			<a href="index.php?controller=photo&action=next&imgId=<?php echo $image->getId() ?>" >
					<?php
       		echo("<img src='".ImageDAO::getUrlPath()."/".$image->getPath($this)."' alt='".$image->getComment()."' title='".$image->getComment()."' class='miniature'/>");
       		?>
       		</a>
       		</div>
       		<?php
       		
		}
		?>
	</div>
		

</div>
